#include <stdio.h>
#include "mpi.h"

int main(int argc, char **argv)
{
    MPI_Datatype newtype;
    int size;
    
    MPI_Init(&argc, &argv);

    MPI_Pack_size(5, MPI_INT, MPI_COMM_WORLD, &size);
    fprintf(stdout, "Should equal 20: %d\n", size);
    
    MPI_Type_contiguous(5, MPI_INT, &newtype);

    MPI_Pack_size(3, newtype, MPI_COMM_WORLD, &size);
    fprintf(stdout, "Should equal 60: %d\n", size);

    MPI_Finalize();
    
    return(0);
}

